package com.collaboration.proton.services;


import com.collaboration.proton.dao.PlayerInformationRepository;
import com.collaboration.proton.entities.Player;
import com.collaboration.proton.entities.PlayerInformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author thousandcat
 * @param
 * @return 无
 *
 */
@Service
public class PlayerInformationService {
    @Autowired
    PlayerInformationRepository playerInformationRepository;

    public List<PlayerInformation>getAll(){
        return playerInformationRepository.findAll();
    }

    public PlayerInformation save(PlayerInformation playerInformation){
        return playerInformationRepository.save(playerInformation);
    }

    public PlayerInformation findPlayerInformationByPlayer(Player player){
        return playerInformationRepository.findPlayerInformationByPlayer(player);
    }
}
